{% extends 'layouts/master-page.html' %}
{% block title %}Vendor browsing{% endblock %}
{% block head %}
<!-- css -->
<link href="/static/css/custom/browse.css" rel="stylesheet" />
{% endblock %}
{% block content %}
  <!-- breadcrumb -->
{% include 'subpages/breadcrumbs.html' %}
  <!-- browse -->
  <table id="vendorTable" class="table table-hover table-striped">
    <thead class="thead-dark">
      <tr>
        {% if product != None %}
          <th class="center_header">
            Products for {{ vendor|htmlDecode }}
          </th>
        {% elif product == None %}
          <th class="center_header">
            Vendors
          </th>
        {% endif %}
      </tr>
    </thead>
    <tbody>
      {% if product != None %}
        {% for p in product %}
          <tr>
            <td><a href="/search/{{ vendor }}/{{ p|htmlEncode }}">{{ p|htmlDecode }}</a></td>
          </tr>
        {% endfor %}
      {% else  %}
        {% for v in vendor %}
          <tr>
            <td><a href="/browse/{{ v }}">{{ v|htmlDecode }}</a></td>
          </tr>
        {% endfor %}
      {% endif %}
    </tbody>
  </table>
{% endblock %}
